home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Light ROM 1
/
LIGHT-ROM 1 (Amiga Library Services)(1994).iso
/
ffdisks
/
d936.lha
/
TKEd
/
Rexx
/
Delete-until-Line.tked
< prev
next >
Wrap
Text File
|
1993-12-20
|
1KB
|
41 lines
/** --------------------------------------------------------------------
** ARexx program to delete from the current line down until a specified
** word is found
** --------------------------------------------------------------------
** AREXX-Programm, das den Text von der aktuellen Zeile an bis zu einer
** gesuchten Wort löscht
** --------------------------------------------------------------------
**
** © Tom Kroener '92
**
**/
LF = '0A'X /* Linefeed */
options results
address 'TKEd.1' /* Portname of the first started TKEd */
GetNumber "Enter last line" /* Get the linnumber of the last line to
delete */
End = result
GetLineNr /* Get number of the current line */
Start = result
Mark /* Beginto mark the block to delete */
DO WHILE Start <= End /* Marks until it reaches the last line
to delete */
Cursor "DOWN" /* Goto next line */
Start = Start + 1 /* Increment linecounter */
END
Request2 "Delete marked block" LF "Are you sure?" /* Request the user */
IF result = 10 THEN /* Cancel: Unmark and exit */
DO; UnmarkBlock
EXIT 10
END
Delete /* OK : Delete block */
EXIT 0 /* ciao */